import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'App',
      redirect: 'hello',
      component: () => import('@/components/layout'),
      children:[
        {
          path: 'hello',
          name: 'HelloWorld',
          // component: HelloWorld,
          component: () => import('@/components/HelloWorld')
        },
        {
          path: 'test',
          name: 'test',
          component: () => import('@/components/test')
        },
        {
          path: 'test2',
          name: 'test2',
          component: () => import('../components/test2')
        }
      ]
    }

  ]
})
